<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [1,12,46,2,45,1,156,14]

        var  emp = []
        console.time('getDataTimer')
        for( var i =0 ; i< arr.length - 1; i++){
            for( var j = 0; j< arr.length - 1 - i; j++){
                if( arr[j] < arr[j+1]){
                    emp = arr[j]
                    arr[j]  = arr[j+1]
                    arr[j+1] = emp
                }
            }
        }
        console.timeEnd('getDataTimer')
        console.log(arr);
      
      //  0.087890625ms

      //   0.0791015625ms
        
    </script>
</body>
</html>